#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@file: test.py
@time: create by fanxl12 on 2020-05-17
"""
__author__ = 'fanxl12'

from flask import make_response, session

from . import web


@web.route('/set/cookie')
def set_cookie():
    response = make_response('Hello fan')
    response.set_cookie('name', 'Fan', 100)
    return response


@web.route('/set/session')
def set_session():
    session['t'] = 1
    return 'over'

@web.route('/get/session')
def get_session():
    return str(session['t'])
